﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

using ServicesComponent.Repositories.Core;
using Business_Objects;
using Data_Objects;
namespace ServicesComponent.Repositories
{
    ///// <summary>
    ///// Truong Repository. Good example of CRUD operations.
    ///// </summary>
    public class TruongRepository : ITruongRepository
    {
        private static readonly ITruongDao _truong = DataAccess.TruongDao;
        public List<Truong> GetList()
        {
            return _truong.GetTruong().ToList();
        }

        public Truong Get(string id)
        {
            return _truong.GetTruongByID(id);
        }

        public void Insert(Truong t)
        {
            _truong.InsertTruong(t);
        }

        public void Update(Truong t)
        {
            _truong.UpdateTruong(t);
        }

        public void Delete(Truong t)
        {
            _truong.DeleteTruong(t);
        }
    }
}